<template>
	<view class="">
		<view class="qiehuan">
			<view class="block">
				<view :class="current == 1 ? 'bg' : 'bg-color'" @click="sectionChange(0)">
					名片夹
				</view>
				<view :class="current == 0 ? 'bg' : 'bg-color'" @click="sectionChange(1)">
					雷达
				</view>
			</view>
			<view>

				<!-- <u-subsection @change="sectionChange" inactive-color="#000" active-color="#fff" bg-color="#f7f8fa"
		                button-color="#e33c21" :list="listing" :current="current"></u-subsection> -->
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		props: ["current"],
		data() {
			return {
				listing: [{
						name: '名片夹'
					},
					{
						name: '雷达'
					}
				],
			};
		},
		methods: {
			sectionChange(e) {
				if (e == 0) {
					uni.redirectTo({
						url: '/pages/userminp/mine/mpjia/mpjia'
					})
				}
				if (e == 1) {
					uni.redirectTo({
						url: '/pages/userminp/mine/mileid/mileid'
					})
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.qiehuan {
		padding: 48rpx;
		padding-right: 260rpx;
	}

	.block {
		width: 300rpx;
		height: 64rpx;
		border-radius: 32rpx;
		background: #f7f8fa;
		display: flex;
		padding-top: 4rpx;

		.bg {
			width: 140rpx;
			height: 54rpx;
			border-radius: 27rpx;
			background: #f7f8fa !important;
			text-align: center;
			font-family: "PingFang SC";
			font-weight: 400;
			font-size: 26rpx;
			line-height: 54rpx;
			color: #161616;
		}

		.bg-color {
			width: 140rpx;
			height: 54rpx;
			line-height: 54rpx;
			border-radius: 27rpx;
			background: #e33c21 !important;
			text-align: center;
			color: #fff;
		}
	}
</style>
